#ifndef XMLPOSITIONPARSER_H
#define XMLPOSITIONPARSER_H

#include <QDebug>

#include <QFile>
#include <QDomDocument>

#include <QStringList>
#include <QList>

#include "instrument.h"
#include "note.h"
#include "position.h"

class XmlPositionParser
{
public:
    XmlPositionParser();

    // Navigation
    QDomElement goToElement(QString cls, QString ins, QString typ, QString ton); // DEPRECATED
    QDomElement goToElement(QStringList string_list);

    // Get instrument tree
    QList< QStringList > getTree(QString cls = "", QString ins = "", QString typ = "", QString ton = ""); // DEPRECATED
    QList< QStringList > getTree(QStringList string_list);

    // Get lists
    QList < BasePosition > getBasePositions(QDomElement e);
    BasePosition getBasePosition(QString name, QDomElement e);
    QList< Position > getPositions(QDomElement e);

    // Get complete instrument
    Instrument getInstrument(QString elem1, QString elem2, QString elem3, QString elem4);
private:
    QDomElement rootElem;
    QDomDocument * doc;
};

#endif // XMLPOSITIONPARSER_H
